package com.my.aslife.service;

import com.my.aslife.module.common.PageRequestVo;
import com.my.aslife.module.common.ResponseResult;
import com.my.aslife.module.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.my.aslife.module.entity.dtos.*;
import io.swagger.models.auth.In;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author jobob
 * @since 2022-12-12
 */
public interface IUserService extends IService<User> {

    ResponseResult<List<User>> getUserListByUIDs(List<Long> ids);

    /**
     * 将账号变成违规
     * @param uid uid
     * @return
     */
    ResponseResult setUserIllegalStatus(Long uid);

    /**
     *  通过UId查询用户信息
     * @param uid uid
     * @return
     */
    ResponseResult queryUserInfoByUID(Long uid);

    /**
     *  扣款，在线支付功能
     * @param deductMoneyDto uid phone money
     * @return
     */
    ResponseResult deductMoney(DeductMoneyDto deductMoneyDto);


    /**
     * 登录函数
     * @param  user 用户
     * @return Result
     */
    ResponseResult login(UserLoginDto user);

    /**
     * 根据 pageRequestVo 获取用户列表
     * @param pageRequestVo 分页请求类
     * @return Result
     */
    ResponseResult getUserInfoByPage(PageRequestVo pageRequestVo);

    /**
     * 注册 by UserName
     * @param user user
     * @return Boolean
     */
    Boolean registerByUserName(User user);

    /**
     * 根据 userName (账号) 查询用户信息
     * @param id id
     * @return User
     */
    User queryUserById(Integer id);

    /**
     * 根据 emailOrUserName (账号) 查询用户信息
     * @param emailOrUserName emailOrUserName
     * @return User
     */
    User queryUserByEmailOrUserName(String emailOrUserName);

    /**
     * 根据 邮箱注册 账号
     * @param registerDto registerDto
     */
    ResponseResult registerByEmail(RegisterDto registerDto);

    /**
     * 改变用户账号 by uid [0 启用 1违规]
     * @param uid uid
     */
    ResponseResult changeUserStatus(Integer uid);

    /**
     * 删除用户 通过 ids
     * @param ids ids
     */
    ResponseResult deleteBatchByIds(String[] ids);

    /**
     * 修改用户权限
     * @param userTypeDto userTypeDto
     * @return ResponseResult
     */
    ResponseResult changeUserType(UserTypeDto userTypeDto);

    /**
     * 重置密码
     * @param resetDto resetDto
     * @return ResponseResult
     */
    ResponseResult ResponseResult(ResetDto resetDto);

    /**
     *  邮箱验证码登录
     * @param user user
     * @return ResponseResult
     */
    ResponseResult loginByEmailCode(UserLoginByEmailDto user);

    /**
     *  修改用户昵称
     * @param userNickDto userNickDto
     * @return ResponseResult
     */
    ResponseResult changeUserNickByUID(UserNickDto userNickDto);


    /**
     *  恢复金额
     * @param user user
     */
    void txMoney(User user);

    void jiaMoney(int i);

    ResponseResult addUserInfo(User user);

    void updateUserRunner(User user);
}
